import request from '@/utils/request'

// 查询商品实时库存列表
export function listGcount(query) {
  return request({
    url: '/storage/gcount/list',
    method: 'get',
    params: query
  })
}

// 查询商品实时库存详细
export function getGcount(gcountId) {
  return request({
    url: '/storage/gcount/' + gcountId,
    method: 'get'
  })
}

// 新增商品实时库存
export function addGcount(data) {
  return request({
    url: '/storage/gcount',
    method: 'post',
    data: data
  })
}

// 修改商品实时库存
export function updateGcount(data) {
  return request({
    url: '/storage/gcount',
    method: 'put',
    data: data
  })
}

// 删除商品实时库存
export function delGcount(gcountId) {
  return request({
    url: '/storage/gcount/' + gcountId,
    method: 'delete'
  })
}

// 导出商品实时库存
export function exportGcount(query) {
  return request({
    url: '/storage/gcount/export',
    method: 'get',
    params: query
  })
}